﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="RecipeDetail.aspx.vb" Inherits="mybaconrecipe.RecipeDetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
    
    <h1>Recipe Detail</h1>
    <p>&nbsp;</p>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource1">
        <Columns>
            <asp:ImageField DataImageUrlField="REC_IMAGE" HeaderText="Recipe Image">
                <ControlStyle CssClass="RecListThumb" />
            </asp:ImageField>
            <asp:BoundField DataField="REC_NAME" HeaderText="REC_NAME" 
                SortExpression="REC_NAME" />
            <asp:BoundField DataField="REC_STARS" HeaderText="REC_STARS" 
                SortExpression="REC_STARS" />
            <asp:BoundField DataField="REC_DESC" HeaderText="REC_DESC" 
                SortExpression="REC_DESC" />
            <asp:BoundField DataField="REC_SERVES" HeaderText="REC_SERVES" 
                SortExpression="REC_SERVES" />
            <asp:BoundField DataField="REC_TIME" HeaderText="REC_TIME" 
                SortExpression="REC_TIME" />
            <asp:BoundField DataField="REC_VIDURL" HeaderText="REC_VIDURL" 
                SortExpression="REC_VIDURL" />
            <asp:BoundField DataField="USER_ID" HeaderText="USER_ID" 
                SortExpression="USER_ID" />
            <asp:BoundField DataField="TYPE_ID" HeaderText="TYPE_ID" 
                SortExpression="TYPE_ID" />
            <asp:BoundField DataField="REC_DATE" HeaderText="REC_DATE" 
                SortExpression="REC_DATE" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:recipeConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:recipeConnectionString.ProviderName %>" 
        SelectCommand="SELECT [REC_IMAGE], [REC_NAME], [REC_STARS], [REC_DESC], [REC_SERVES], [REC_TIME], [REC_VIDURL], [USER_ID], [TYPE_ID], [REC_DATE] FROM [RECIPE] WHERE ([REC_ID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="REC_ID" QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    </p>
    <h2>Comments</h2>
    <p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False">
            <Columns>
                <asp:BoundField DataField="COMM_DATE" HeaderText="COMM_DATE" 
                    SortExpression="COMM_DATE" />
                <asp:BoundField DataField="USER_ID" HeaderText="USER_ID" 
                    SortExpression="USER_ID" />
                <asp:BoundField DataField="COMM_DESC" HeaderText="COMM_DESC" 
                    SortExpression="COMM_DESC" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:recipeConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:recipeConnectionString.ProviderName %>" 
            SelectCommand="SELECT [USER_ID], [COMM_DESC], [COMM_DATE] FROM [COMMENT] WHERE ([REC_ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="REC_ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
    <h2>Enter Your Comment</h2>
    </p>
    <p>
    <table>
        <tr>
            <td>Comment</td>
            <td>
                <asp:TextBox ID="tb_CommComment" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td></td>
            <td></td>
        </tr>
        <tr>
            <td></td>
            <td>
                <asp:Button ID="btn_AddComment" runat="server" Text="Add Comment" /></td>
        </tr>
    </table>
    </p>
    <p><br /></p>
</asp:Content>
